#ifndef CUSTOMER_H_
#define CUSTOMER_H_

#include <string>
#include <sstream>
#include "Street_address.h"

using namespace std;

struct Customer {
public:
    /**
     * Constructor
     */
    Customer() { // RA S2
    }
    
    /**
     * Constructor
     * @param id Customer id
     * @param n Customer name
     * @param a Customer address
     */
    Customer(int id, string n, Street_address a) : cust_id(id), cust_name(n), addr(a) { // RA A1
    }

    // utility functions
    string display() const { // RA S2
        ostringstream oss;
        oss << cust_id << "\t" << cust_name << "\t" << addr.get_number() << "\t" << addr.get_street() << "\t" << addr.get_postal_code();
        return oss.str();
    }

	static string display_header() {							// RA A.2
		return "ID\tName\tAddr Num\tAddr Street\tPostal Code";	// RA A.2
	}															// RA A.2

    // getter
    int get_cust_id() const { // RA S2
        return cust_id;
    }

    string get_cust_name() const {  // RA S2
        return cust_name;
    }

    Street_address get_addr() const {  // RA S2
        return addr;
    }

private:
    //constants

    // private data
    int cust_id;
    string cust_name;
    Street_address addr;
};

#endif //CUSTOMER_H_
